From: YAMAMOTO Mitsuharu Date: Mon, 11 May 2009 09:29:49 +0000 (+0000) Subject: (xftfont_open): Make sure that Xrender extension is added X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~421^2~615 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=f602b732eec47b7c6e5620c0087a507eda240a7a;p=emacs.git (xftfont_open): Make sure that Xrender extension is added before Xft one (Bug#1696). --- diff --git a/src/xftfont.c b/src/xftfont.c index af0feb9b7e6..4a1b488bcf9 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -274,6 +274,16 @@ xftfont_open (f, entity, pixel_size) BLOCK_INPUT; + /* Make sure that the Xrender extension is added before the Xft one. + Otherwise, the close-display hook set by Xft is called after the + one for Xrender, and the former tries to re-add the latter. This + results in inconsistency of internal states and leads to X + protocol error when one reconnects to the same X server. + (Bug#1696) */ + { + int event_base, error_base; + XRenderQueryExtension (display, &event_base, &error_base); + } match = XftFontMatch (display, FRAME_X_SCREEN_NUMBER (f), pat, &result); FcPatternDestroy (pat); xftfont = XftFontOpenPattern (display, match);